<%@page import="org.ddr.board.BoardVO"%>
<%@page import="org.ddr.board.dao.BbsDAO"%>
<%@page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
	request.setCharacterEncoding("utf-8");
	String userid;
	String title;
	String content;
	Integer gNo;
	Integer gOrd;
	Integer pNo;
	Integer depth;
	
	userid = request.getParameter("userid");
	title = request.getParameter("title");
	content = request.getParameter("content");
	gNo = Integer.parseInt(request.getParameter("gno"));
	gOrd = Integer.parseInt(request.getParameter("gord"));
	pNo = Integer.parseInt(request.getParameter("pno"));
	depth = Integer.parseInt(request.getParameter("depth"));
	BoardVO vo = new BoardVO();
	
	vo.setUserId(userid);
	vo.setTitle(title);
	vo.setContents(content);
	vo.setgNo(gNo);
	vo.setgOrd(gOrd + 1);
	vo.setpNo(pNo);
	vo.setDepth(depth + 1);
	
	BbsDAO.instance.reWrite(vo);
	response.sendRedirect("boardlist.jsp");
%>
</body>
</html>